using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsObjectOpResponse : GeneratedMessageLite<SnsObjectOpResponse, SnsObjectOpResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsObjectOpResponse, SnsObjectOpResponse.Builder>
		{
			private bool resultIsReadOnly;
			private SnsObjectOpResponse result;
			protected override SnsObjectOpResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsObjectOpResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsObjectOpResponse DefaultInstanceForType
			{
				get
				{
					return SnsObjectOpResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint OpCount
			{
				get
				{
					return this.result.OpCount;
				}
				set
				{
					this.SetOpCount(value);
				}
			}
			public IPopsicleList<int> OpRetListList
			{
				get
				{
					return this.PrepareBuilder().opRetList_;
				}
			}
			public int OpRetListCount
			{
				get
				{
					return this.result.OpRetListCount;
				}
			}
			public Builder()
			{
				this.result = SnsObjectOpResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsObjectOpResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsObjectOpResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsObjectOpResponse other = this.result;
					this.result = new SnsObjectOpResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsObjectOpResponse.Builder Clear()
			{
				this.result = SnsObjectOpResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsObjectOpResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsObjectOpResponse.Builder(this.result);
				}
				return new SnsObjectOpResponse.Builder().MergeFrom(this.result);
			}
			public override SnsObjectOpResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsObjectOpResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsObjectOpResponse)
				{
					return this.MergeFrom((SnsObjectOpResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsObjectOpResponse.Builder MergeFrom(SnsObjectOpResponse other)
			{
				return this;
			}
			public override SnsObjectOpResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsObjectOpResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsObjectOpResponse._snsObjectOpResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsObjectOpResponse._snsObjectOpResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasOpCount = input.ReadUInt32(ref this.result.opCount_);
							continue;
						}
						switch (num3)
						{
						case 24u:
						case 26u:
							input.ReadInt32Array(num, text, this.result.opRetList_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsObjectOpResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public SnsObjectOpResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public SnsObjectOpResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public SnsObjectOpResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public SnsObjectOpResponse.Builder SetOpCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpCount = true;
				this.result.opCount_ = value;
				return this;
			}
			public SnsObjectOpResponse.Builder ClearOpCount()
			{
				this.PrepareBuilder();
				this.result.hasOpCount = false;
				this.result.opCount_ = 0u;
				return this;
			}
			public int GetOpRetList(int index)
			{
				return this.result.GetOpRetList(index);
			}
			public SnsObjectOpResponse.Builder SetOpRetList(int index, int value)
			{
				this.PrepareBuilder();
				this.result.opRetList_[index] = value;
				return this;
			}
			public SnsObjectOpResponse.Builder AddOpRetList(int value)
			{
				this.PrepareBuilder();
				this.result.opRetList_.Add(value);
				return this;
			}
			public SnsObjectOpResponse.Builder AddRangeOpRetList(IEnumerable<int> values)
			{
				this.PrepareBuilder();
				this.result.opRetList_.Add(values);
				return this;
			}
			public SnsObjectOpResponse.Builder ClearOpRetList()
			{
				this.PrepareBuilder();
				this.result.opRetList_.Clear();
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int OpCountFieldNumber = 2;
		public const int OpRetListFieldNumber = 3;
		private static readonly SnsObjectOpResponse defaultInstance;
		private static readonly string[] _snsObjectOpResponseFieldNames;
		private static readonly uint[] _snsObjectOpResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasOpCount;
		private uint opCount_;
		private int opRetListMemoizedSerializedSize;
		private PopsicleList<int> opRetList_ = new PopsicleList<int>();
		private int memoizedSerializedSize = -1;
		public static SnsObjectOpResponse DefaultInstance
		{
			get
			{
				return SnsObjectOpResponse.defaultInstance;
			}
		}
		public override SnsObjectOpResponse DefaultInstanceForType
		{
			get
			{
				return SnsObjectOpResponse.DefaultInstance;
			}
		}
		protected override SnsObjectOpResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint OpCount
		{
			get
			{
				return this.opCount_;
			}
		}
		public IList<int> OpRetListList
		{
			get
			{
				return Lists.AsReadOnly<int>(this.opRetList_);
			}
		}
		public int OpRetListCount
		{
			get
			{
				return this.opRetList_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasOpCount && this.BaseResponse.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasOpCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpCount);
				}
				int num2 = 0;
				using (IEnumerator<int> enumerator = this.OpRetListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						int current = enumerator.get_Current();
						num2 += CodedOutputStream.ComputeInt32SizeNoTag(current);
					}
				}
				num += num2;
				if (this.opRetList_.Count != 0)
				{
					num += 1 + CodedOutputStream.ComputeInt32SizeNoTag(num2);
				}
				this.opRetListMemoizedSerializedSize = num2;
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsObjectOpResponse()
		{
		}
		public int GetOpRetList(int index)
		{
			return this.opRetList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsObjectOpResponseFieldNames = SnsObjectOpResponse._snsObjectOpResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, snsObjectOpResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasOpCount)
			{
				output.WriteUInt32(2, snsObjectOpResponseFieldNames[1], this.OpCount);
			}
			if (this.opRetList_.Count > 0)
			{
				output.WritePackedInt32Array(3, snsObjectOpResponseFieldNames[2], this.opRetListMemoizedSerializedSize, this.opRetList_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasOpCount)
			{
				num ^= this.opCount_.GetHashCode();
			}
			using (IEnumerator<int> enumerator = this.opRetList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					int current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsObjectOpResponse snsObjectOpResponse = value as SnsObjectOpResponse;
			if (snsObjectOpResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != snsObjectOpResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(snsObjectOpResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasOpCount != snsObjectOpResponse.hasOpCount || (this.hasOpCount && !this.opCount_.Equals(snsObjectOpResponse.opCount_)))
			{
				return false;
			}
			if (this.opRetList_.Count != snsObjectOpResponse.opRetList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.opRetList_.Count; i++)
			{
				if (!this.opRetList_[i].Equals(snsObjectOpResponse.opRetList_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsObjectOpResponse, SnsObjectOpResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<SnsObjectOpResponse, SnsObjectOpResponse.Builder>.PrintField("OpCount", this.hasOpCount, this.opCount_, writer);
			GeneratedMessageLite<SnsObjectOpResponse, SnsObjectOpResponse.Builder>.PrintField<int>("OpRetList", this.opRetList_, writer);
		}
		public static SnsObjectOpResponse ParseFrom(byte[] data)
		{
			return SnsObjectOpResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsObjectOpResponse MakeReadOnly()
		{
			this.opRetList_.MakeReadOnly();
			return this;
		}
		public static SnsObjectOpResponse.Builder CreateBuilder()
		{
			return new SnsObjectOpResponse.Builder();
		}
		public override SnsObjectOpResponse.Builder ToBuilder()
		{
			return SnsObjectOpResponse.CreateBuilder(this);
		}
		public override SnsObjectOpResponse.Builder CreateBuilderForType()
		{
			return new SnsObjectOpResponse.Builder();
		}
		public static SnsObjectOpResponse.Builder CreateBuilder(SnsObjectOpResponse prototype)
		{
			return new SnsObjectOpResponse.Builder(prototype);
		}
		static SnsObjectOpResponse()
		{
			SnsObjectOpResponse.defaultInstance = new SnsObjectOpResponse().MakeReadOnly();
			SnsObjectOpResponse._snsObjectOpResponseFieldNames = new string[]
			{
				"BaseResponse",
				"OpCount",
				"OpRetList"
			};
			SnsObjectOpResponse._snsObjectOpResponseFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.SnsObjectOpResponse.Descriptor, null);
		}
	}
}
